﻿using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace TRIG_MOD_STATUSSUMMARY.DS_StatusSummaryCNT
{
    [ToolboxItemAttribute(false)]
    public class DS_StatusSummaryCNT : WebPart
    {
        // Visual Studio might automatically update this path when you change the Visual Web Part project item.
        private const string _ascxPath = @"~/_CONTROLTEMPLATES/TRIG_MOD_STATUSSUMMARY/DS_StatusSummaryCNT/DS_StatusSummaryCNTUserControl.ascx";

        protected string lstName;

        [WebBrowsable(true)]
        [WebDisplayName("TaskListName")]
        [WebDescription("To retrieve list item through Web part Tool Part property")]
        [Personalizable(PersonalizationScope.Shared)]
        [Category("List Item Configuration")]

        public string docTypeName
        {

            get { return lstName; }
            set { lstName = value; }
        }
        protected override void CreateChildControls()
        {
            //Control control = Page.LoadControl(_ascxPath);
            //Controls.Add(control);

            DS_StatusSummaryCNTUserControl control =
            (DS_StatusSummaryCNTUserControl)Page.LoadControl(_ascxPath);
            control.ParentWebPart = this;
            Controls.Add(control);
        }
    }
}
